Skip to content

[StepSecurity] Apply security best practices - #22

Merged
mauriciomenon merged 2 commits into
masterfrom
chore/GHA-031126-stepsecurity-remediation
May 12, 2026
Merged

[StepSecurity] Apply security best practices#22
mauriciomenon merged 2 commits into
masterfrom
chore/GHA-031126-stepsecurity-remediation

Conversation

@stepsecurity-app

@stepsecurity-app stepsecurity-app Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

Summary

This pull request has been generated by StepSecurity as part of your enterprise subscription to ensure compliance with recommended security best practices. Please review and merge the pull request to apply these security enhancements.

Security Fixes

Harden Runner

Harden-Runner is an open-source security agent for the GitHub-hosted runner to prevent software supply chain attacks. It prevents exfiltration of credentials, detects tampering of source code during build, and enables running jobs without sudo access.

Feedback

For bug reports, feature requests, and general feedback; please create an issue in step-security/secure-repo or contact us via our website.


Summary by cubic

Add step-security/harden-runner (pinned to v2.19.1) to the secret scanning workflow with egress-policy: audit to log all outbound calls and harden the GitHub runner. This reduces exfiltration and tampering risk during CI without changing job behavior.

Written for commit 7473b73. Summary will update on new commits.

Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @stepsecurity-app[bot], you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@codeant-ai

codeant-ai Bot commented May 3, 2026

Copy link
Copy Markdown

Skipping PR review because a bot author is detected.

If you want to trigger CodeAnt AI, comment @codeant-ai review to trigger a manual review.

@bito-code-review

Copy link
Copy Markdown

Bito Automatic Review Skipped - Files Excluded

Bito didn't auto-review because all changed files are in the exclusion list. You can change the excluded files settings here, or contact the agent instance creator at .

@snyk-io

snyk-io Bot commented May 3, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@bito-app-staging

Copy link
Copy Markdown

Bito Automatic Review Skipped - Files Excluded

Bito didn't auto-review because all changed files are in the exclusion list. You can change the excluded files settings here, or contact the agent instance creator at .

@codacy-production

codacy-production Bot commented May 3, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@llamapreview llamapreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Code Review by LlamaPReview

🎯 TL;DR & Recommendation

Recommendation: Approve with suggestions

This PR adds step-security/harden-runner to the secret scanning workflow, implementing a security best practice. However, the egress-policy is set to audit, which limits its effectiveness to observability only. Moving to block mode with an allowed-endpoints list would provide stronger protection.

🌟 Strengths

  • Adds security hardening to the CI pipeline following OpenSSF recommendations.

💡 Suggestions (P2)

  • .github/workflows/secret_scan.yml: The egress-policy: audit logs outbound calls but does not block malicious traffic; consider moving to block mode with an allowed-endpoints list after validation to fully prevent credential exfiltration.

💡 Have feedback? We'd love to hear it in our GitHub Discussions.
✨ This review was generated by LlamaPReview Advanced, which is free for all open-source projects. Learn more.

Comment on lines +20 to +23
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
with:
egress-policy: audit

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 | Confidence: Medium

The egress-policy is set to audit, which logs outbound calls but does not block any network traffic. For a security-focused workflow, auditing alone may provide limited protection against credential exfiltration or supply-chain attacks. The documentation for harden-runner recommends moving to block mode (with an allowed endpoint list) after verifying the workflow’s network requirements. Setting egress-policy: audit is a safe initial step, but the PR should include a comment or follow-up task to transition to block once the allowed endpoints are validated. Without this, the security benefit of the runner hardening is reduced to observability only, leaving the CI pipeline still susceptible to malicious outbound calls.

Code Suggestion:

- name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
        with:
          egress-policy: block   # Future: change to 'audit' when testing new endpoints
          allowed-endpoints: > #
            api.github.com:443
            github.com:443
            objects.githubusercontent.com:443

@mauriciomenon
mauriciomenon merged commit abee58f into master May 12, 2026
8 of 34 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant